class Programmer {
    name: string;
    goodAt: string;

    constructor(name: string, goodAt: string) {
        this.name = name;
        this.goodAt = goodAt;
    }

    info(): string {
        return `姓名：${this.name}，擅长：${this.goodAt}`;
    }
}

let programmer = new Programmer("ShirDon", "Programming");
let res = programmer.info();
console.log(res)
// $ tsc TypeScriptExample6.ts
// $ node TypeScriptExample6.js
// 姓名：ShirDon，擅长：Programming